package com.ht.medicaltreatment.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.ht.medicaltreatment.R
import com.ht.medicaltreatment.bean.FilePathBean

class FileListAdapter : BaseQuickAdapter<FilePathBean,BaseViewHolder>(R.layout.item_file_list_layout){
    override fun convert(holder: BaseViewHolder, item: FilePathBean) {
        if(item.name.endsWith("xlsx")){
            holder.setBackgroundResource(R.id.imgIcon,R.drawable.icon_excel)
        }
        holder.setText(R.id.tvName,item.name)
    }
}
